package jaux.message.codec.utils;

/**
 * Created by Mihajlovic on 24/05/2017.
 */
public class CharColor {
    public static final String ANSI_RESET = "\u001B[0m";
    public static final String ANSI_RED = "\u001B[31m";
    public static final String ANSI_GREEN = "\u001B[32m";
    public static final String ANSI_YELLOW = "\u001B[33m";
    public static final String ANSI_BLUE = "\u001B[34m";
    public static final String ANSI_WHITE = "\u001B[37m";

    public static String red(String str) {
        return decorate(ANSI_RED, str);
    }

    public static String r(String str) {
        return red(str);
    }

    public static String green(String str) {
        return decorate(ANSI_GREEN, str);
    }

    public static String g(String str) {
        return green(str);
    }

    public static String blue(String str){
        return decorate(ANSI_BLUE, str);
    }

    public static String b(String str) {
        return blue(str);
    }

    public static String yellow(String str){
        return decorate(ANSI_YELLOW, str);
    }

    public static String y(String str) {
        return yellow(str);
    }

    public static String white(String str){
        return decorate(ANSI_WHITE, str);
    }

    public static String w(String str) {
        return white(str);
    }

    public static String decorate(String color, String str){
        return color + str + ANSI_RESET;
    }
}
